process {
    withName: ".*FASTQ_ALIGN_BAMCMP_BWA:BWA_MEM_PRIMARY" {
        ext.prefix = {"${meta.id}_primary"}
        ext.args2 = "-n"
    }
    withName: ".*FASTQ_ALIGN_BAMCMP_BWA:BWA_MEM_CONTAMINANT" {
        ext.prefix = {"${meta.id}_contaminant"}
        ext.args2 = "-n"
    }
    withName: ".*FASTQ_ALIGN_BAMCMP_BWA:BAMCMP" {
        ext.args = '-s "as"'
        ext.prefix = {"${meta.id}_filtered"}
        ext.prefix2 = {"${meta.id}_contamination_output"}
    }
}
